<template>
    <div id="dashboardTitle">
        <h1>欢迎您，{{title}}</h1>
        <span>今日，{{day}}</span>
    </div>
</template>

<script>
import {tenBitTimestamp} from '@/utils/index'
export default {
    data(){
        return{
            day:''
        }
    },
    mounted(){
        let dates = new Date()
        this.day = tenBitTimestamp(parseInt(dates.getTime()/1000))
    },
    props:{
        title:{
            type:String,
            default:''
        }
    }
}
</script>

<style scoped lang='scss'>
#dashboardTitle{
    h1{
        font-size: 30px;
        font-weight:300;
        margin: 0;
    }
    span{
        display: block;
        margin-top:10px;
        font-size: 15px;
        color: #1f263e;
        font-family: PingFangSC-Light,PingFang SC;
    }
}
</style>